package com.xfcy.blog.dto;

import com.xfcy.blog.valid.AddGroup;
import com.xfcy.blog.valid.ListValue;
import com.xfcy.blog.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author 晓风残月Lx
 * @date 2023/5/29 17:26
 */
@Data
public class JobDTO {

    @Null(message = "新增不能有id", groups = AddGroup.class)
    @NotNull(message = "修改id不能为空", groups = UpdateGroup.class)
    private Long jobId;

    @NotBlank(message = "任务名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String jobName;

    @NotBlank(message = "任务分组不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String jobGroup;

    @NotBlank(message = "是否并发不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String concurrent;

    @NotBlank(message = "cron表达式不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String cronExpression;

    @NotBlank(message = "调用方法不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String invokeTarget;

    @NotBlank(message = "错误策略不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String misfirePolicy;

    @NotBlank(message = "状态不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String status;

    @NotBlank(message = "备注信息不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String remark;

}
